YEARS algorithm